home *** CD-ROM | disk | FTP | other *** search
/ Programmer Power Tools / Programmer Power Tools.iso / progjrn / pj_7_1.arc / WINDINST.PAS < prev    next >
Pascal/Delphi Source File  |  1988-09-10  |  2KB  |  54 lines

  1. { WindTest installer in Turbo Pascal 4.0/5.0 by Tom Swan }
  2.  
  3. PROGRAM WindInst;
  4.  
  5.  
  6. USES  Crt, TCUnit, WindGlob;
  7.  
  8. CONST FileName = 'WINDTEST.EXE';    { File to modify }
  9.  
  10. VAR   userQuits : Boolean;          { True to end program }
  11.  
  12.  
  13. FUNCTION MenuChar : Char;
  14.  
  15. { Display menu and return selection }
  16.  
  17. BEGIN
  18.    ClrScr;
  19.    Writeln( 'WindTest Installation Program' );
  20.    Writeln( '--------------------------------------------' );
  21.    Writeln( 'A - Border foreground ...... ', WBForeColor:2 );
  22.    Writeln( 'B - Border background ...... ', WBBackColor:2 );
  23.    Writeln( 'C - Text foreground ........ ', WTForeColor:2 );
  24.    Writeln( 'D - Text background ........ ', WTBackColor:2 );
  25.    Writeln( 'E - Window title ........... ', WTitle );
  26.    Writeln;
  27.    Writeln( 'Q - Quit and save changes' );
  28.    Writeln( 'X - Quit and do NOT save changes' );
  29.    Writeln;
  30.    Write(   'Pick a letter, any letter: ' );
  31.    MenuChar := UpCase( ReadKey )
  32. END; { MenuChar }
  33.  
  34.  
  35. {$V-}    { Turn off string-parameter length checking }
  36.  
  37. BEGIN
  38.    userQuits := False;
  39.    REPEAT
  40.       CASE MenuChar OF
  41.          'A' : GetWord( 'Border foreground', WBForeColor, 0, 15 );
  42.          'B' : GetWord( 'Border background', WBBackColor, 0, 15 );
  43.          'C' : GetWord( 'Text foreground', WTForeColor, 0, 15 );
  44.          'D' : GetWord( 'Text background', WTBackColor, 0, 15 );
  45.          'E' : GetStr( 'Window title', WTitle, 40 );
  46.          'Q' : userQuits := ChangesSaved( fileName, CBase, 
  47.                               Ofs( CBase ), Ofs( EBase ) );
  48.          'X' : userQuits := True
  49.       END { case }
  50.    UNTIL userQuits;
  51.    GotoXY( 1, 25 )
  52. END.
  53.  
  54.